<template>
	<view class="content">
		<view class="searchBox">
			<view class="search">
				<input type="text" v-model="name" class="inp" placeholder="输入问题标题搜索">
				<view class="btn">
					<image src="../../static/image/search.png" @click="getList()" class="icon" mode=""></image>
				</view>
			</view>
		</view>
		<view style="height: 600rpx;" v-if="list.length==0">
			<u-empty text="暂无信息" mode="message"></u-empty>
		</view>
		<view class="item" v-for="(item,index) in list" v-else @click="goInfo('/pages-send/workOrderInfo/workOrderInfo?id='+item.id)">
			<view class="top">
				<view :class="item.status==1?'left':item.status==2?'lefts':item.status==3?'leftss':''">{{item.status==1?'待回复':item.status==2?'已回复':item.status==3?'已完结':''}}</view>
				<view class="right">{{item.issue}}</view>
			</view>
			<view class="bottom" v-if="item.type==1">催取件</view>
			<view class="bottom" v-if="item.type==2">重量异常</view>
			<view class="bottom" v-if="item.type==3">虚假取件</view>
			<view class="bottom" v-if="item.type==7">签收未收到货</view>
			<view class="bottom" v-if="item.type==8">错件</view>
			<view class="bottom" v-if="item.type==9">催物流</view>
			<view class="bottom" v-if="item.type==10">催派送</view>
			<view class="bottom" v-if="item.type==13">核实退回原因</view>
			<view class="bottom" v-if="item.type==14">物流停滞</view>
			<view class="bottom" v-if="item.type==15">重新分配快递员</view>
			<view class="bottom" v-if="item.type==16">取消运单</view>
		</view>
	</view>
</template>

<script>
	import {workOrderList} from '../../common/api.js'
	export default {
		data() {
			return {
				list:[],
				item:{},
				name:''
			}
		},
		onLoad(e) {
			this.getList()
		},
		methods: {
			getList(type){
				workOrderList({
					issue:this.name
				}).then(res=>{
					if(res.code==10000){
						this.list = res.data.list
						
					}
				})
			},
			goInfo(url){
				uni.navigateTo({
					url:url
				})
			},
		}
	}
</script>
<style>
	page{
		background: #EDEFF2;
	}
</style>
<style scoped lang="scss">
.content{
	width: 750rpx;
	padding: 32rpx;
	box-sizing: border-box;
	.searchBox{
		width: 100%;
		padding: 24rpx;
		box-sizing: border-box;
		.search{
			width: 100%;
			height: 80rpx;
			background: #fff;
			border-radius: 50rpx;
			padding:0 24rpx;
			box-sizing: border-box;
			display: flex;
			flex-wrap: nowrap;
			align-items: center;
			.inp{
				width: calc(100% - 84rpx - 24rpx);
				height: 100%;
				font-size: 24rpx;
			}
			.btn{
				width: 84rpx;
				height: 52rpx;
				background: #1AA261;
				border-radius: 50rpx;
				margin-left: 24rpx;
				display: flex;
				justify-content: center;
				align-items: center;
				.icon{
					width: 24rpx;
					height: 24rpx;
				}
			}
		}
	}
	.item{
		width: 100%;
		// height: 130rpx;
		background: #fff;
		border-radius: 20rpx;
		margin-bottom: 32rpx;
		padding: 33rpx 41rpx;
		box-sizing: border-box;
		.bottom{
			font-family: PingFangSC, PingFang SC;
			font-weight: 400;
			font-size: 24rpx;
			color: #666666;
			line-height: 42rpx;
			text-align: left;
			font-style: normal;
			margin-top: 18rpx;
		}
		.top{
			display: flex;
			flex-wrap: nowrap;
			align-items: center;
			.left{
				width: 80rpx;
				height: 34rpx;
				background: #1AA261;
				border-radius: 4rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 500;
				font-size: 20rpx;
				color: #FFFFFF;
				line-height: 34rpx;
				text-align: center;
				font-style: normal;

			}
			.lefts{
				width: 80rpx;
				height: 34rpx;
				border: 2rpx solid #1AA261;
				border-radius: 4rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 500;
				font-size: 20rpx;
				color: #1AA261;
				line-height: 34rpx;
				text-align: center;
				font-style: normal;
			}
			.leftss{
				width: 80rpx;
				height: 34rpx;
				background: #B5B5B5;
				border-radius: 4rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 500;
				font-size: 20rpx;
				color: #FFFFFF;
				line-height: 34rpx;
				text-align: center;
				font-style: normal;
			}
			.right{
				margin-left: 16rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 600;
				font-size: 28rpx;
				color: #333333;
				line-height: 28rpx;
				text-align: left;
				font-style: normal;
			}
		}
	}
}
</style>
